home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / getscrn.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  472 b   |  25 lines

  1. /*
  2. ** getscrn.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include "pictor.h"
  9.  
  10. /*
  11. ** Saves a section of the screen to a buffer.
  12. */
  13. void getscrn(int *buffer,int top,int left,int height,int width)
  14. {
  15.     int row,col;
  16.  
  17.     for(row = 0;row < height;row++) {
  18.         setvpos(top + row,left);
  19.         for(col = 0;col < width;col++) {
  20.             *buffer++ = vgetca();  /* get character & attribute */
  21.         }
  22.     }
  23.  
  24. } /* getscrn */
  25.